home *** CD-ROM | disk | FTP | other *** search
- @Echo off
- Rem ZIP2ZMOP.BAT To Clean Up Files as Called By ZIP2ZIP?.BAT's
-
- GoTo Start
- Rem This is a POWERFUL DELETE Batch Flie. Change With CAUTION!
- Rem Env Variable SAFETY is SET in ZIP2ZIP.BAT. Protect from Cmd Line "testing"
- Rem %1 is Supplied by ZIP2ZIP?.BAT as "D:\SubDir\" (The orig %1 from cmd line)
- Rem %2 is Supplied by ZIP2ZIP?.BAT as "Z_B or Z_B\Z_C" Start Search Path
- Rem %3 is Supplied by ZIP2ZIP?.BAT as "Z_B Z_C Z_D" Search Word
- Rem %4 Is Either Blank or Y, depending on if Ok or Canceled conversion.
- Rem ╔═══════════ Supplied Parmeters By ════════════╗
- Rem ║ %%1 %%2 Start in; & to Rd %%3 srch %%4 ║
- Rem V════════════════════════════════════════════════╝
- Rem ZIP2ZIPB %%1 Z_B (Place holder) Z_B %CNZL%
- Rem C %%1 Z_B Z_C %CNZL%
- Rem D %%1 Z_B\Z_C Z_D %CNZL%
- \_ Has a Trailing "\"
- Rem The ONLY reason that this is run is to do Failed Zips or OK Zips that
- Rem have a read only File in which case PKZip can't Delete the work dir Z_?
-
- :Start
-
- IF NOT "%1"=="" IF NOT "%2"=="" IF "%SAFETY%"=="0Ff" GoTo ZIP2_MOP_UP
-
- GoTo ZIP2_ONLY
-
- :ZIP2_MOP_UP
- Rem Next Line VERY Important. Only Do Cancels once from _B, Not stepwise.
- IF NOT "%3"=="Z_B" IF "%4"=="Y" GoTo End
-
- Echo Zip2zMOP.Bat Executing
-
- GoTo %3
-
- :Z_B
- Call ZIP2-SDE.BAT %1 %3
- Echo ...Exiting Zip2zMOP
- IF "%FSIZE%"=="" GoTo Prog_Err
- IF "%FSIZE%"=="0" GoTo End
- IF NOT "%4"=="" GoTo CNZL_YES
-
- Echo !Above ZIP Contained a Read Only File (Perhaps Hidden, System) >>%1ZIP2ZIP.LOG
- Echo !Contained a Read Only HSR (Hidden, Sys or Read Only)
-
- :CNZL_YES
- Attrib %1%2\*.* -r -h -s /S
- PKZIP %1%2\JUNK %1%2\*.* -mrp -e0
- For %%f in (%1%2\*.*) DO Del %%f >Nul
- Rd %1%2
- GoTo End
-
- :Z_C
- :Z_D
- Call ZIP2-SDE.BAT %1%2\ %3
- Echo ...Exiting Zip2zMOP
- IF "%FSIZE%"=="" GoTo Prog_Err
- IF "%FSIZE%"=="0" GoTo End
-
- Echo !Above Contained a Read Only File (Perhaps Hidden, System) >>%1ZIP2ZIP.LOG
- Echo !Contained a Read Only HSR (Hidden, Sys or Read Only)
-
- Attrib %1%2\%3\*.* -r -h -s /S
- PKZIP %1%2\%3\JUNK %1%2\%3\*.* -mrp -e0
- For %%f in (%1%2\%3\*.*) DO Del %%f >Nul
- Rd %1%2\%3
- GoTo End
-
- :ZIP2_ONLY
-
- Echo THIS %0 SHOULD ONLY BE RUN AS CALLED BY ZIP2ZIP?.BAT Files
- GoTo End
-
- :PROG_ERR
-
- Echo Major Flaw in Program Logic. Stop Using This Program. Contact Author.
- Echo Major Flaw in Program Logic Encountered in Zip2zMOP.BAT >>%1ZIP2ZIP.LOG
- Echo Cancel With ^C (Control C)
- Pause
-
- :End
-